home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / pine / imap-3.0 / MailManager / Utilities.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-03-18  |  3.1 KB  |  90 lines

  1. /*
  2.  * Program:    Distributed Electronic Mail Manager (Utilities)
  3.  *
  4.  * Author:    Mark Crispin
  5.  *        Networks and Distributed Computing
  6.  *        Computing & Communications
  7.  *        University of Washington
  8.  *        Administration Building, AG-44
  9.  *        Seattle, WA  98195
  10.  *        Internet: MRC@CAC.Washington.EDU
  11.  *
  12.  * Date:    9 May 1989
  13.  * Last Edited:    18 March 1993
  14.  *
  15.  * Copyright 1993 by the University of Washington
  16.  *
  17.  *  Permission to use, copy, modify, and distribute this software and its
  18.  * documentation for any purpose and without fee is hereby granted, provided
  19.  * that the above copyright notice appears in all copies and that both the
  20.  * above copyright notice and this permission notice appear in supporting
  21.  * documentation, and that the name of the University of Washington not be
  22.  * used in advertising or publicity pertaining to distribution of the software
  23.  * without specific, written prior permission.  This software is made
  24.  * available "as is", and
  25.  * THE UNIVERSITY OF WASHINGTON DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
  26.  * WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT LIMITATION ALL IMPLIED
  27.  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND IN
  28.  * NO EVENT SHALL THE UNIVERSITY OF WASHINGTON BE LIABLE FOR ANY SPECIAL,
  29.  * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  30.  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, TORT
  31.  * (INCLUDING NEGLIGENCE) OR STRICT LIABILITY, ARISING OUT OF OR IN CONNECTION
  32.  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  33.  *
  34.  */
  35.  
  36. // Support for MailManager streamprops
  37.  
  38. STREAMPROP {
  39.   MAILSTREAM *stream;        // MAIL stream attached to window
  40.   MBoxWindow *window;        // associated MBoxWindow
  41.   int nmsgs;            // number of messages
  42.   STREAMPROP *previous;        // back pointer
  43.   STREAMPROP *next;        // forward pointer
  44. };
  45.  
  46.  
  47. // Support for sequences (created by MBoxWindow, used by ReadWindow)
  48.  
  49. SEQUENCE {
  50.   LONGCACHE *lelt;        // cache pointer for this message
  51.   SEQUENCE *previous;        // back pointer
  52.   SEQUENCE *next;        // forward pointer
  53. };
  54.  
  55.  
  56. // Function prototypes
  57.  
  58. void headerline (char *text,MAILSTREAM *stream,MESSAGECACHE *elt);
  59. void selstr (char *str,char *name,const char *arg);
  60. ADDRESS *copy_adr (ADDRESS *adr,ADDRESS *ret);
  61. DPSTimedEntryProc mm_wakeup (DPSTimedEntry teNumber,double now,void *userData);
  62. void putstreamprop (MAILSTREAM *stream,MBoxWindow *window);
  63. STREAMPROP *getstreamprop (MAILSTREAM *stream);
  64. char *fixnl (char *text);
  65. unsigned char *gettext (Text *view);
  66. void linebreak (unsigned char *dst,unsigned char *src);
  67. void wordcopy (unsigned char **wrd,unsigned char **dst,unsigned char **src,
  68.            unsigned char *end);
  69. void append_msg (FILE *file,ADDRESS *s,MESSAGECACHE *elt,char *hdr,
  70.          unsigned char *text);
  71. char *filtered_header (ENVELOPE *env);
  72. void write_address (char **dest,char *tag,ADDRESS *adr);
  73.  
  74.  
  75. // Header geometry
  76.  
  77. #define FLAGS "RFAD"
  78. #define DATE "dd-mmm"
  79. #define FROM "ffffffffffffffffffff"
  80. #define SUBJECT "sssssssssssssssssssssssssssssssss"
  81. #define FLAGSLEN sizeof (FLAGS)
  82. #define DATELEN sizeof (DATE)
  83. #define FROMLEN sizeof (FROM)
  84. #define SUBJECTLEN sizeof (SUBJECT)
  85.  
  86.  
  87. // Message geometry
  88.  
  89. #define MAXLINELENGTH 78
  90.